% The following 13 lines generate data file xx for Example 1 (predict
% the Mackey-Glass time-series plus noise). You may use other data 
% file xx and start from load xx.
% load xx


load 88.97.mat
% yy=springtest(:,2)';
data=data1(1:1141,:);
data1=data1(1141:1429,:);
[datan1,PS1]=mapminmax(data,0,1);
[datan2,PS]=mapminmax(data1,0,1);
data=

yy=datan1;

X=data;
XX=data1;
Train_X=X(1:8822,1:6);
Train_D=X(1:8822,7); 
Text_z=XX(1:1050,1:6);
Text_ty=XX(1:1050,7);

% for i=113:length(xx)
%  for j=1:12
%  data(i-112,j)=xx(i+j-12-1);
%  end;
% end;
% save mg_data
% 
% for i=107:length(xx)
%  for j=1:6
%  data(i-106,j)=xx(i+j-6-1);
%  end;
% end;
% save mg_data
yy=K;
for i=8:length(yy)
 for j=1:7
 data1(i-7,j)=yy(i+j-7-1);
 end
end


% save springtest_mg
